<?php

/*
 * - Okek CMS
 * - create by Jg and Tito
 * - Okek Projects 2012
 * - CMS developed for free use
 * - More info http://habbo-dev.com
 */

class Io {
    
    public function GetDir($dir) {
        if(!is_dir($dir))
            return false;

        $result = array();
        $files 	= glob($dir . '/*');

        foreach($files as $file)
        {
            if(is_dir($file))
            {
                if($subdir)
                        $result .= $this->GetDir($dir);
                else
                        $result[] = str_replace($dir, '', $file);
            }
            else if(is_file($file))
                $result[] = str_replace($dir . '/', '', $file);
        }

        return $result;
    }
}
?>
